{"ast":null,"code":"/* eslint-disable no-nested-ternary */\nvar PIXEL_PATTERN = /margin|padding|width|height|max|min|offset/;\nvar removePixel = {\n  left: true,\n  top: true\n};\nvar floatMap = {\n  cssFloat: 1,\n  styleFloat: 1,\n  float: 1\n};\nfunction getComputedStyle(node) {\n  return node.nodeType === 1 ? node.ownerDocument.defaultView.getComputedStyle(node, null) : {};\n}\nfunction getStyleValue(node, type, value) {\n  type = type.toLowerCase();\n  if (value === 'auto') {\n    if (type === 'height') {\n      return node.offsetHeight;\n    }\n    if (type === 'width') {\n      return node.offsetWidth;\n    }\n  }\n  if (!(type in removePixel)) {\n    removePixel[type] = PIXEL_PATTERN.test(type);\n  }\n  return removePixel[type] ? parseFloat(value) || 0 : value;\n}\nexport function get(node, name) {\n  var length = arguments.length;\n  var style = getComputedStyle(node);\n  name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;\n  return length === 1 ? style : getStyleValue(node, name, style[name] || node.style[name]);\n}\nexport function set(node, name, value) {\n  var length = arguments.length;\n  name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;\n  if (length === 3) {\n    if (typeof value === 'number' && PIXEL_PATTERN.test(name)) {\n      value = \"\".concat(value, \"px\");\n    }\n    node.style[name] = value; // Number\n    return value;\n  }\n  for (var x in name) {\n    if (name.hasOwnProperty(x)) {\n      set(node, x, name[x]);\n    }\n  }\n  return getComputedStyle(node);\n}\nexport function getOuterWidth(el) {\n  if (el === document.body) {\n    return document.documentElement.clientWidth;\n  }\n  return el.offsetWidth;\n}\nexport function getOuterHeight(el) {\n  if (el === document.body) {\n    return window.innerHeight || document.documentElement.clientHeight;\n  }\n  return el.offsetHeight;\n}\nexport function getDocSize() {\n  var width = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);\n  var height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);\n  return {\n    width: width,\n    height: height\n  };\n}\nexport function getClientSize() {\n  var width = document.documentElement.clientWidth;\n  var height = window.innerHeight || document.documentElement.clientHeight;\n  return {\n    width: width,\n    height: height\n  };\n}\nexport function getScroll() {\n  return {\n    scrollLeft: Math.max(document.documentElement.scrollLeft, document.body.scrollLeft),\n    scrollTop: Math.max(document.documentElement.scrollTop, document.body.scrollTop)\n  };\n}\nexport function getOffset(node) {\n  var box = node.getBoundingClientRect();\n  var docElem = document.documentElement;\n\n  // < ie8 不支持 win.pageXOffset, 则使用 docElem.scrollLeft\n  return {\n    left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0),\n    top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body.clientTop || 0)\n  };\n}","map":{"version":3,"names":["PIXEL_PATTERN","removePixel","left","top","floatMap","cssFloat","styleFloat","float","getComputedStyle","node","nodeType","ownerDocument","defaultView","getStyleValue","type","value","toLowerCase","offsetHeight","offsetWidth","test","parseFloat","get","name","length","arguments","style","set","concat","x","hasOwnProperty","getOuterWidth","el","document","body","documentElement","clientWidth","getOuterHeight","window","innerHeight","clientHeight","getDocSize","width","Math","max","scrollWidth","height","scrollHeight","getClientSize","getScroll","scrollLeft","scrollTop","getOffset","box","getBoundingClientRect","docElem","pageXOffset","clientLeft","pageYOffset","clientTop"],"sources":["/data/messenger.client/node_modules/rc-util/es/Dom/css.js"],"sourcesContent":["/* eslint-disable no-nested-ternary */\nvar PIXEL_PATTERN = /margin|padding|width|height|max|min|offset/;\nvar removePixel = {\n  left: true,\n  top: true\n};\nvar floatMap = {\n  cssFloat: 1,\n  styleFloat: 1,\n  float: 1\n};\nfunction getComputedStyle(node) {\n  return node.nodeType === 1 ? node.ownerDocument.defaultView.getComputedStyle(node, null) : {};\n}\nfunction getStyleValue(node, type, value) {\n  type = type.toLowerCase();\n  if (value === 'auto') {\n    if (type === 'height') {\n      return node.offsetHeight;\n    }\n    if (type === 'width') {\n      return node.offsetWidth;\n    }\n  }\n  if (!(type in removePixel)) {\n    removePixel[type] = PIXEL_PATTERN.test(type);\n  }\n  return removePixel[type] ? parseFloat(value) || 0 : value;\n}\nexport function get(node, name) {\n  var length = arguments.length;\n  var style = getComputedStyle(node);\n  name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;\n  return length === 1 ? style : getStyleValue(node, name, style[name] || node.style[name]);\n}\nexport function set(node, name, value) {\n  var length = arguments.length;\n  name = floatMap[name] ? 'cssFloat' in node.style ? 'cssFloat' : 'styleFloat' : name;\n  if (length === 3) {\n    if (typeof value === 'number' && PIXEL_PATTERN.test(name)) {\n      value = \"\".concat(value, \"px\");\n    }\n    node.style[name] = value; // Number\n    return value;\n  }\n  for (var x in name) {\n    if (name.hasOwnProperty(x)) {\n      set(node, x, name[x]);\n    }\n  }\n  return getComputedStyle(node);\n}\nexport function getOuterWidth(el) {\n  if (el === document.body) {\n    return document.documentElement.clientWidth;\n  }\n  return el.offsetWidth;\n}\nexport function getOuterHeight(el) {\n  if (el === document.body) {\n    return window.innerHeight || document.documentElement.clientHeight;\n  }\n  return el.offsetHeight;\n}\nexport function getDocSize() {\n  var width = Math.max(document.documentElement.scrollWidth, document.body.scrollWidth);\n  var height = Math.max(document.documentElement.scrollHeight, document.body.scrollHeight);\n  return {\n    width: width,\n    height: height\n  };\n}\nexport function getClientSize() {\n  var width = document.documentElement.clientWidth;\n  var height = window.innerHeight || document.documentElement.clientHeight;\n  return {\n    width: width,\n    height: height\n  };\n}\nexport function getScroll() {\n  return {\n    scrollLeft: Math.max(document.documentElement.scrollLeft, document.body.scrollLeft),\n    scrollTop: Math.max(document.documentElement.scrollTop, document.body.scrollTop)\n  };\n}\nexport function getOffset(node) {\n  var box = node.getBoundingClientRect();\n  var docElem = document.documentElement;\n\n  // < ie8 不支持 win.pageXOffset, 则使用 docElem.scrollLeft\n  return {\n    left: box.left + (window.pageXOffset || docElem.scrollLeft) - (docElem.clientLeft || document.body.clientLeft || 0),\n    top: box.top + (window.pageYOffset || docElem.scrollTop) - (docElem.clientTop || document.body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